Xceed .NET Libraries Documentation
Xceed.Compression.Formats Assembly / Xceed.Compression.Formats Namespace / ChecksumStream Class / CalculateCrc32 Method / CalculateCrc32(Byte[],Int32,Int32,Int32) Method
The byte array whose checksum will be calculated.
The zero-based byte offset in buffer at which to begin reading bytes.
The number of bytes to read from buffer.
The CRC32 checksum from a previous call to CalculateCrc32 or 0 if a new CRC should be calculated.


In This Topic
    CalculateCrc32(Byte[],Int32,Int32,Int32) Method
    In This Topic
    Calculates a CRC32 checksum for the specified byte array.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function CalculateCrc32( _
       ByVal buffer() As Byte, _
       ByVal offset As Integer, _
       ByVal count As Integer, _
       ByVal previousCrc As Integer _
    ) As Integer
    'Usage
     
    
    Dim buffer() As Byte
    Dim offset As Integer
    Dim count As Integer
    Dim previousCrc As Integer
    Dim value As Integer
     
    value = ChecksumStream.CalculateCrc32(buffer, offset, count, previousCrc)
    public static int CalculateCrc32( 
       byte[] buffer,
       int offset,
       int count,
       int previousCrc
    )

    Parameters

    buffer
    The byte array whose checksum will be calculated.
    offset
    The zero-based byte offset in buffer at which to begin reading bytes.
    count
    The number of bytes to read from buffer.
    previousCrc
    The CRC32 checksum from a previous call to CalculateCrc32 or 0 if a new CRC should be calculated.

    Return Value

    The CRC32 checksum calculated for the buffer, including the previous CRC if any.
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Standard: netstandard2.0, netstandard2.1

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also